// File: include/slam_robot/imu_publisher.hpp
#ifndef IMU_PUBLISHER_HPP_
#define IMU_PUBLISHER_HPP_

#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include "slam_robot/serial_bridge.hpp"  

class ImuPublisher{
public:
    explicit ImuPublisher(rclcpp::Node* parent_node, std::shared_ptr<SerialBridge> serial);

private:

    rclcpp::Node* parent_node_;
    
    void publishImu();

    std::shared_ptr<SerialBridge> serial_;
    rclcpp::Publisher<sensor_msgs::msg::Imu>::SharedPtr publisher_;
    rclcpp::TimerBase::SharedPtr timer_;
};

#endif // IMU_PUBLISHER_HPP_